const koa = require('koa')
const koastatic = require('koa-static')
const router = require('./routes')
const config = require('./config')



const app = new koa();






//默认使用跟目录下的静态文件
app.use(koastatic(__dirname + '/page'));


app.use(router.routes())





// 开启服务器
const PORT = config.port || 3000;

app.listen(PORT, () => {
	console.info('Server Starting Success: localhost:' + PORT);
});


